home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: libmd5.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [R*ch] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 42 75 69 6c 74 2d 69 |\section|{Built-i|
|00000010| 6e 20 6d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |n module| \sectco|
|00000020| 64 65 7b 6d 64 35 7d 7d | 0d 5c 62 69 6d 6f 64 69 |de{md5}}|.\bimodi|
|00000030| 6e 64 65 78 7b 6d 64 35 | 7d 0d 0d 54 68 69 73 20 |ndex{md5|}..This |
|00000040| 6d 6f 64 75 6c 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |module i|mplement|
|00000050| 73 20 74 68 65 20 69 6e | 74 65 72 66 61 63 65 20 |s the in|terface |
|00000060| 74 6f 20 52 53 41 27 73 | 20 4d 44 35 20 6d 65 73 |to RSA's| MD5 mes|
|00000070| 73 61 67 65 20 64 69 67 | 65 73 74 0d 61 6c 67 6f |sage dig|est.algo|
|00000080| 72 69 74 68 6d 20 28 73 | 65 65 20 61 6c 73 6f 20 |rithm (s|ee also |
|00000090| 74 68 65 20 66 69 6c 65 | 20 5c 66 69 6c 65 7b 6d |the file| \file{m|
|000000a0| 64 35 2e 64 6f 63 7d 29 | 2e 20 49 74 73 20 75 73 |d5.doc})|. Its us|
|000000b0| 65 20 69 73 20 71 75 69 | 74 65 0d 73 74 72 61 69 |e is qui|te.strai|
|000000c0| 67 68 74 66 6f 72 77 61 | 72 64 3a 20 75 73 65 20 |ghtforwa|rd: use |
|000000d0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 5c 63 6f |the func|tion \co|
|000000e0| 64 65 7b 6d 64 35 7d 20 | 74 6f 20 63 72 65 61 74 |de{md5} |to creat|
|000000f0| 65 20 61 6e 0d 5c 64 66 | 6e 7b 6d 64 35 7d 2d 6f |e an.\df|n{md5}-o|
|00000100| 62 6a 65 63 74 2e 20 59 | 6f 75 20 63 61 6e 20 6e |bject. Y|ou can n|
|00000110| 6f 77 20 60 60 66 65 65 | 64 27 27 20 74 68 69 73 |ow ``fee|d'' this|
|00000120| 20 6f 62 6a 65 63 74 20 | 77 69 74 68 20 61 72 62 | object |with arb|
|00000130| 69 74 72 61 72 79 0d 73 | 74 72 69 6e 67 73 2e 0d |itrary.s|trings..|
|00000140| 0d 41 74 20 61 6e 79 20 | 74 69 6d 65 20 79 6f 75 |.At any |time you|
|00000150| 20 63 61 6e 20 61 73 6b | 20 66 6f 72 20 74 68 65 | can ask| for the|
|00000160| 20 60 60 66 69 6e 61 6c | 27 27 20 64 69 67 65 73 | ``final|'' diges|
|00000170| 74 20 6f 66 20 74 68 65 | 20 6f 62 6a 65 63 74 2e |t of the| object.|
|00000180| 20 49 6e 74 65 72 6e 61 | 6c 6c 79 2c 0d 61 20 74 | Interna|lly,.a t|
|00000190| 65 6d 70 6f 72 61 72 79 | 20 63 6f 70 79 20 6f 66 |emporary| copy of|
|000001a0| 20 74 68 65 20 6f 62 6a | 65 63 74 20 69 73 20 6d | the obj|ect is m|
|000001b0| 61 64 65 20 61 6e 64 20 | 74 68 65 20 64 69 67 65 |ade and |the dige|
|000001c0| 73 74 20 69 73 20 63 6f | 6d 70 75 74 65 64 20 61 |st is co|mputed a|
|000001d0| 6e 64 0d 72 65 74 75 72 | 6e 65 64 2e 20 42 65 63 |nd.retur|ned. Bec|
|000001e0| 61 75 73 65 20 6f 66 20 | 74 68 65 20 63 6f 70 79 |ause of |the copy|
|000001f0| 2c 20 74 68 65 20 64 69 | 67 65 73 74 20 6f 70 65 |, the di|gest ope|
|00000200| 72 61 74 69 6f 6e 20 69 | 73 20 6e 6f 74 20 64 65 |ration i|s not de|
|00000210| 73 74 72 75 63 74 69 76 | 65 0d 66 6f 72 20 74 68 |structiv|e.for th|
|00000220| 65 20 6f 62 6a 65 63 74 | 2e 20 42 65 66 6f 72 65 |e object|. Before|
|00000230| 20 61 20 6d 6f 72 65 20 | 65 78 61 63 74 20 64 65 | a more |exact de|
|00000240| 73 63 72 69 70 74 69 6f | 6e 20 6f 66 20 74 68 65 |scriptio|n of the|
|00000250| 20 6d 6f 64 75 6c 65 27 | 73 20 75 73 65 2c 20 61 | module'|s use, a|
|00000260| 20 73 6d 61 6c 6c 0d 65 | 78 61 6d 70 6c 65 20 77 | small.e|xample w|
|00000270| 69 6c 6c 20 62 65 20 68 | 65 6c 70 66 75 6c 3a 20 |ill be h|elpful: |
|00000280| 0d 74 6f 20 6f 62 74 61 | 69 6e 20 74 68 65 20 64 |.to obta|in the d|
|00000290| 69 67 65 73 74 20 6f 66 | 20 74 68 65 20 73 74 72 |igest of| the str|
|000002a0| 69 6e 67 20 5c 63 6f 64 | 65 7b 27 61 62 63 27 7d |ing \cod|e{'abc'}|
|000002b0| 2c 20 75 73 65 20 5c 6c | 64 6f 74 73 0d 0d 5c 62 |, use \l|dots..\b|
|000002c0| 63 6f 64 65 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |code\beg|in{verba|
|000002d0| 74 69 6d 7d 0d 3e 3e 3e | 20 66 72 6f 6d 20 6d 64 |tim}.>>>| from md|
|000002e0| 35 20 69 6d 70 6f 72 74 | 20 6d 64 35 0d 3e 3e 3e |5 import| md5.>>>|
|000002f0| 20 6d 20 3d 20 6d 64 35 | 28 29 0d 3e 3e 3e 20 6d | m = md5|().>>> m|
|00000300| 2e 75 70 64 61 74 65 28 | 27 61 62 63 27 29 0d 3e |.update(|'abc').>|
|00000310| 3e 3e 20 6d 2e 64 69 67 | 65 73 74 28 29 0d 27 5c |>> m.dig|est().'\|
|00000320| 32 32 30 5c 30 30 31 50 | 5c 32 33 30 3c 5c 33 32 |220\001P|\230<\32|
|00000330| 32 4f 5c 32 36 30 5c 33 | 32 36 5c 32 32 36 3f 7d |2O\260\3|26\226?}|
|00000340| 28 5c 33 34 31 5c 31 37 | 37 72 27 0d 5c 65 6e 64 |(\341\17|7r'.\end|
|00000350| 7b 76 65 72 62 61 74 69 | 6d 7d 5c 65 63 6f 64 65 |{verbati|m}\ecode|
|00000360| 0d 0d 4d 6f 72 65 20 63 | 6f 6e 64 65 6e 73 65 64 |..More c|ondensed|
|00000370| 3a 0d 0d 5c 62 63 6f 64 | 65 5c 62 65 67 69 6e 7b |:..\bcod|e\begin{|
|00000380| 76 65 72 62 61 74 69 6d | 7d 0d 3e 3e 3e 20 6d 64 |verbatim|}.>>> md|
|00000390| 35 28 27 61 62 63 27 29 | 2e 64 69 67 65 73 74 28 |5('abc')|.digest(|
|000003a0| 29 0d 27 5c 32 32 30 5c | 30 30 31 50 5c 32 33 30 |).'\220\|001P\230|
|000003b0| 3c 5c 33 32 32 4f 5c 32 | 36 30 5c 33 32 36 5c 32 |<\322O\2|60\326\2|
|000003c0| 32 36 3f 7d 28 5c 33 34 | 31 5c 31 37 37 72 27 0d |26?}(\34|1\177r'.|
|000003d0| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 5c 65 |\end{ver|batim}\e|
|000003e0| 63 6f 64 65 0d 0d 5c 72 | 65 6e 65 77 63 6f 6d 6d |code..\r|enewcomm|
|000003f0| 61 6e 64 7b 5c 69 6e 64 | 65 78 73 75 62 69 74 65 |and{\ind|exsubite|
|00000400| 6d 7d 7b 28 69 6e 20 6d | 6f 64 75 6c 65 20 6d 64 |m}{(in m|odule md|
|00000410| 35 29 7d 0d 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |5)}.\beg|in{funcd|
|00000420| 65 73 63 7d 7b 6d 64 35 | 7d 7b 5c 6f 70 74 69 6f |esc}{md5|}{\optio|
|00000430| 6e 61 6c 7b 61 72 67 7d | 7d 0d 20 20 43 72 65 61 |nal{arg}|}. Crea|
|00000440| 74 65 20 61 20 6e 65 77 | 20 6d 64 35 2d 6f 62 6a |te a new| md5-obj|
|00000450| 65 63 74 2e 20 49 66 20 | 5c 76 61 72 7b 61 72 67 |ect. If |\var{arg|
|00000460| 7d 20 69 73 20 70 72 65 | 73 65 6e 74 2c 20 61 6e |} is pre|sent, an|
|00000470| 20 69 6e 69 74 69 61 6c | 0d 20 20 5c 63 6f 64 65 | initial|. \code|
|00000480| 7b 75 70 64 61 74 65 7d | 20 6d 65 74 68 6f 64 20 |{update}| method |
|00000490| 69 73 20 63 61 6c 6c 65 | 64 20 77 69 74 68 20 5c |is calle|d with \|
|000004a0| 76 61 72 7b 61 72 67 7d | 20 61 73 20 61 72 67 75 |var{arg}| as argu|
|000004b0| 6d 65 6e 74 2e 0d 5c 65 | 6e 64 7b 66 75 6e 63 64 |ment..\e|nd{funcd|
|000004c0| 65 73 63 7d 0d 0d 41 6e | 20 6d 64 35 2d 6f 62 6a |esc}..An| md5-obj|
|000004d0| 65 63 74 20 68 61 73 20 | 74 68 65 20 66 6f 6c 6c |ect has |the foll|
|000004e0| 6f 77 69 6e 67 20 6d 65 | 74 68 6f 64 73 3a 0d 0d |owing me|thods:..|
|000004f0| 5c 72 65 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 69 |\renewco|mmand{\i|
|00000500| 6e 64 65 78 73 75 62 69 | 74 65 6d 7d 7b 28 6d 64 |ndexsubi|tem}{(md|
|00000510| 35 20 6d 65 74 68 6f 64 | 29 7d 0d 5c 62 65 67 69 |5 method|)}.\begi|
|00000520| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 75 70 64 61 |n{funcde|sc}{upda|
|00000530| 74 65 7d 7b 61 72 67 7d | 0d 20 20 55 70 64 61 74 |te}{arg}|. Updat|
|00000540| 65 20 74 68 69 73 20 6d | 64 35 2d 6f 62 6a 65 63 |e this m|d5-objec|
|00000550| 74 20 77 69 74 68 20 74 | 68 65 20 73 74 72 69 6e |t with t|he strin|
|00000560| 67 20 5c 76 61 72 7b 61 | 72 67 7d 2e 0d 5c 65 6e |g \var{a|rg}..\en|
|00000570| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0d 0d 5c 62 65 |d{funcde|sc}..\be|
|00000580| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 64 69 |gin{func|desc}{di|
|00000590| 67 65 73 74 7d 7b 7d 0d | 25 20 58 58 58 20 54 68 |gest}{}.|% XXX Th|
|000005a0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 69 73 20 6e |e follow|ing is n|
|000005b0| 6f 74 20 71 75 69 74 65 | 20 63 6c 65 61 72 3b 20 |ot quite| clear; |
|000005c0| 77 68 61 74 20 64 6f 65 | 73 20 4d 44 35 46 69 6e |what doe|s MD5Fin|
|000005d0| 61 6c 20 64 6f 3f 0d 20 | 20 52 65 74 75 72 6e 20 |al do?. | Return |
|000005e0| 74 68 65 20 5c 64 66 6e | 7b 64 69 67 65 73 74 7d |the \dfn|{digest}|
|000005f0| 20 6f 66 20 74 68 69 73 | 20 6d 64 35 2d 6f 62 6a | of this| md5-obj|
|00000600| 65 63 74 2e 20 49 6e 74 | 65 72 6e 61 6c 6c 79 2c |ect. Int|ernally,|
|00000610| 20 61 20 63 6f 70 79 20 | 69 73 20 6d 61 64 65 0d | a copy |is made.|
|00000620| 20 20 61 6e 64 20 74 68 | 65 20 5c 43 2d 66 75 6e | and th|e \C-fun|
|00000630| 63 74 69 6f 6e 20 5c 63 | 6f 64 65 7b 4d 44 35 46 |ction \c|ode{MD5F|
|00000640| 69 6e 61 6c 7d 20 69 73 | 20 63 61 6c 6c 65 64 2e |inal} is| called.|
|00000650| 20 46 69 6e 61 6c 6c 79 | 20 74 68 65 20 64 69 67 | Finally| the dig|
|00000660| 65 73 74 20 69 73 0d 20 | 20 72 65 74 75 72 6e 65 |est is. | returne|
|00000670| 64 2e 0d 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |d..\end{|funcdesc|
|00000680| 7d 0d 0d 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00000690| 73 63 7d 7b 63 6f 70 79 | 7d 7b 7d 0d 20 20 52 65 |sc}{copy|}{}. Re|
|000006a0| 74 75 72 6e 20 61 20 73 | 65 70 61 72 61 74 65 20 |turn a s|eparate |
|000006b0| 63 6f 70 79 20 6f 66 20 | 74 68 69 73 20 6d 64 35 |copy of |this md5|
|000006c0| 2d 6f 62 6a 65 63 74 2e | 20 20 41 6e 20 5c 63 6f |-object.| An \co|
|000006d0| 64 65 7b 75 70 64 61 74 | 65 7d 20 74 6f 20 74 68 |de{updat|e} to th|
|000006e0| 69 73 0d 20 20 63 6f 70 | 79 20 77 6f 6e 27 74 20 |is. cop|y won't |
|000006f0| 61 66 66 65 63 74 20 74 | 68 65 20 6f 72 69 67 69 |affect t|he origi|
|00000700| 6e 61 6c 20 6f 62 6a 65 | 63 74 2e 0d 5c 65 6e 64 |nal obje|ct..\end|
|00000710| 7b 66 75 6e 63 64 65 73 | 63 7d 0d |{funcdes|c}. |
+--------+-------------------------+-------------------------+--------+--------+